import child_process = require('child_process');
export function RunScript(cmd: string, args: string[], callback: Function) {
  const child = child_process.spawn(cmd, args);
  let res = '';
  child.stdout.on('data', (buffer) => { res += buffer.toString() });
  child.stdout.on('error', (err) => {
    console.log(err.message);
  })
  child.stdout.on('end', () => {
    callback && callback(res);
  })
}